{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# QCoDeS Example with Rigol DP832 Power Supply" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from qcodes.instrument_drivers.rigol import RigolDP832" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create the instrument (in this case a Rigol DP832 connected with ethernet to the 10.0.0.102 address)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Connected to: RIGOL TECHNOLOGIES DP832 (serial:DP8xxxxxxxxxx, firmware:00.01.14) in 0.12s\n" ] } ], "source": [ "ps = RigolDP832('ps', 'TCPIP0::10.0.0.102::inst0::INSTR')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can set voltage and/or current to any channel" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "ps.ch1.set_voltage(1)\n", "ps.ch1.set_current(0.2)\n", "ps.ch2.set_voltage(10)\n", "ps.ch3.set_current(2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Channel(s) should be turned on" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "ps.ch1.state('on')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Voltage, current and power can be measured" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "V1= 1.0072\n", "I1= 0.0005\n", "P1= 0.001\n" ] } ], "source": [ "print('V1=', ps.ch1.voltage())\n", "print('I1=', ps.ch1.current())\n", "print('P1=', ps.ch1.power())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "DP832 supports Over- Voltage (OVP) and Current (OCP) protections" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "ps.ch1.ovp_value(1.2)\n", "ps.ch1.ocp_value(0.05)\n", "ps.ch1.ovp_state('on')\n", "ps.ch1.ocp_state('on')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Working mode can be probed 9Voltage/Current regulatde, or unregulated)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'ConstantVoltage'" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ps.ch1.mode()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "qcodespip310", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.8" }, "nbsphinx": { "execute": "never" }, "vscode": { "interpreter": { "hash": "877bdf401a755bd1ca03bfff5025f0aef86a1f0055843840ae8b9a03952abbf7" } } }, "nbformat": 4, "nbformat_minor": 2 }